package com.fau.wm.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.json.simple.JSONAware;
import org.json.simple.JSONObject;

/**
 * @desc 库存不足提醒表
 * @author liy
 * @datetime 2014年12月21日,下午3:40:42
 */
@Entity
@Table(name = "medical_stockout_warn")
public class MedicalStockoutWarn implements Serializable, JSONAware {

	private static final long serialVersionUID = 5118221246798682942L;
	
	private String id;
	private Integer num;	// 提醒数
	private String eid;		// 企业Id
	
	
	@Id
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@GeneratedValue(generator = "generator")
	@Column(name = "id", length = 32)
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "num", length = 3)
	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	@Column(name = "eid", length = 32)
	public String getEid() {
		return eid;
	}

	public void setEid(String eid) {
		this.eid = eid;
	}

	@SuppressWarnings("unchecked")
	@Override
	public String toJSONString() {
		JSONObject object = new JSONObject();
		object.put("id", id);
		object.put("num", num);
		return object.toString();
	}

}
